package com.hd.day05;

public class demo {
    public static void main(String[] args) {
        String[] strs = new String[]{"cir","car"};

        int szLen = strs.length;
        // 第一个的长度
        int strLen = strs[0].length();
        String reStr = "";
       L: for (int i = 0; i < strLen; i++) {
            char c = strs[0].charAt(i);

           Boolean t = true;
            for (int j = 0; j < szLen; j++) {
                if (i >= strs[j].length()) {
                    break L;
                }

                if (strs[j].charAt(i) != c) {
                    t = false;
                    break;
                }
            }
           if (t) {
               reStr += c;
           }
        }
        System.out.println(reStr);

    }
}
